﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Globalization;
using System.Threading;
using IDE_week2_Forms_project;

namespace IDE_week2_Forms_project
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

        }
        
        private void ChangeLanguage(string lang)
        {
            foreach (Control c in this.Controls)
            {
                ComponentResourceManager resources =
                      new ComponentResourceManager(typeof(Form1));
                resources.ApplyResources(c, c.Name, new CultureInfo(lang));
            }
        }


        private void btnNewForm_Click(object sender, EventArgs e)
        {
            Form2 form2 = new Form2();

            form2.Visible = true;
        }

        private void btnChangeIcon_Click(object sender, EventArgs e)
        {
            Icon = Properties.Resources.Icon2;
        }

        private void btnResetIcon_Click(object sender, EventArgs e)
        {
            Icon = Properties.Resources.Icon1;
        }

        private void btnChangeLanguage_Click(object sender, EventArgs e)
        {
            
            if (btnChangeLanguage.Text == "Verander taal")
            {
                ChangeLanguage("en-US");
            }
            else
            {
                ChangeLanguage("nl");
            }
            
        }

        private void btnCallClass_Click(object sender, EventArgs e)
        {
            int[] numbers = new int[10];
            Class1.MakeRandomNumber(numbers);
            label1.Text = numbers[0] + ", " + numbers[1] + ", " + numbers[2];

        }
        
    }   
}


    

